<?
	$seq = $param->getNumber('seq');
	if ($seq!="")
	{
		$db = GetDefaultConnection();
		$sql = sprintf("SELECT a.JBNH_SEQ, a.FARM_SEQ, T_PRODUCT_COUNTRY, T_PRODUCT_ITEM1, T_PRODUCT_ITEM2, PRODUCT_GRADE2, PRODUCT_STANDARD2, T_PRODUCT_WEIGHT2, T_PRODUCT_NUMBER, T_PRODUCT_TOTAL, T_PRODUCT_WORKYN, T_PRODUCT_DATE FROM TB_PRODUCT_TEMP a left join TB_PRODUCT b on a.T_PRODUCT_SEQ=b.T_PRODUCT_SEQ WHERE a.T_PRODUCT_SEQ=%d", $seq);
		$list = $db->queryList($sql);

		if ($list != null)
		{
			$row = & $list->next();
			$jseq = $row->getNumber('JBNH_SEQ');
			$fseq = $row->getNumber('FARM_SEQ');
			$ocountry = $row->getString('T_PRODUCT_COUNTRY');
			$oitem1 = $row->getNumber('T_PRODUCT_ITEM1');
			$oitem2 = $row->getNumber('T_PRODUCT_ITEM2');
			$ograde2 = $row->getNumber('PRODUCT_GRADE2');
			$ostandard2 = $row->getNumber('PRODUCT_STANDARD2');
			$oweight2 = $row->getNumber('T_PRODUCT_WEIGHT2');
			$onumber = $row->getNumber('T_PRODUCT_NUMBER');
			$ototal = $row->getNumber('T_PRODUCT_TOTAL');
			$owork = $row->getString('T_PRODUCT_WORKYN');;
			$odate = $row->getString('T_PRODUCT_DATE');
		}
	}
	$ndate = ($odate=="") ? date('Y-m-d') : $odate;
?>